package com.dianjing.dianjing.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author LBG
 * @since 2022-11-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Order对象", description="订单表")
@TableName("`order`") // order是关键名（order by），必须这样操作，否则无法操作表
public class Order implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "订单id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "需求方昵称")
    private String demandName;

    @ApiModelProperty(value = "需求方头像")
    private String demandIcon;

    @ApiModelProperty(value = "画师昵称")
    private String painterName;

    @ApiModelProperty(value = "画师头像")
    private String painterIcon;

    @ApiModelProperty(value = "订单标题")
    private String title;

    @ApiModelProperty(value = "订单内容")
    private String content;

    @ApiModelProperty(value = "订单类型")
    // 修改由String（名）改为Inter类型（id）
    private Integer type;

    @ApiModelProperty(value = "订单报价")
    private Double price;

    @ApiModelProperty(value = "订单ddl")
    private Date ddl;

    @ApiModelProperty(value = "订单状态 订单状态 0-待创作 1-待确认 2-已完成")
    private Integer state;

    @ApiModelProperty(value = "订单星级")
    private Integer starLevel;

    @ApiModelProperty(value = "订单评价")
    private String evaluate;

    @ApiModelProperty(value = "需求方id")
    private Long demandUserId;

    @ApiModelProperty(value = "画师id")
    private Long painterId;

    @ApiModelProperty(value = "是否公开展示 0-否 1-是")
    private Integer open;

}
